package com.example.tellwin.api;


import com.example.tellwin.base.BaseResponse;
import com.example.tellwin.home.bean.ActivityContentBean;
import com.example.tellwin.home.bean.ActivityDetailContentBean;
import com.example.tellwin.home.bean.ContentBean;
import com.example.tellwin.home.bean.ListContentBean;
import com.example.tellwin.home.bean.QuestionContentBean;
import com.example.tellwin.home.bean.UploadFileResultBean;
import com.example.tellwin.mine.bean.AttentionQuestionContentBean;
import com.example.tellwin.mine.bean.AttentionTeacherContentBean;
import com.example.tellwin.mine.bean.ExpenseRecordContentBean;
import com.example.tellwin.mine.bean.OrderContentBean;
import com.example.tellwin.mine.bean.ShareContentBean;
import com.example.tellwin.mine.bean.TeacherContentBean;
import com.example.tellwin.mine.bean.UserBean;
import com.example.tellwin.mine.bean.UserContentBean;
import com.example.tellwin.question.bean.UploadFileBean;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * 接口集中类
 * Created by wei.qt on 2018/4/9/007.
 */
public interface TwjfApiService {

    //登录
    @POST("heaven-api/api/user/userLogion")
    Observable<BaseResponse<UserBean>> login(@Body RequestBody body);

    @POST("heaven-api/api/send/sms")
//获取验证码
    Observable<BaseResponse<Object>> getVerificationCode(@Body RequestBody requestBody);

    @POST("heaven-api/api/user/userRegister")
//注册
    Observable<BaseResponse<UserBean>> register(@Body RequestBody requestBody);

    @GET("heaven-api/api/index/banner")
//轮播图
    Observable<BaseResponse<ContentBean>> homeBanner();

    @GET("heaven-api/api/index/column")
//首页栏目
    Observable<BaseResponse<ContentBean>> homeColumn();

    @GET("heaven-api/api/index/indexQuestionList")
//首页栏目问题列表
    Observable<BaseResponse<QuestionContentBean>> indexQuestionList(@Query("page") String page, @Query("pageSize") String pageSize, @Query("columnId") String columnId);

    //更新个人信息
    @POST("heaven-api/api/my/updateUserInfo")
    Observable<BaseResponse<Object>> updateUserInfo(@Body RequestBody requestBody);

    @GET("heaven-api/api/index/facultyTeam")
    Observable<BaseResponse<ContentBean>> getTeacherTeam();

    @GET("heaven-api/api/index/activityList")
    Observable<BaseResponse<ActivityContentBean>> getActivityList(@Query("page") String page, @Query("pageSize") String pageSize);

    @POST("heaven-api/api/index/follow")
    Observable<BaseResponse<Object>> follow(@Body RequestBody requestBody);

    @GET("heaven-api/api/index/activityDetails")
    Observable<BaseResponse<ActivityDetailContentBean>> getActivityDetail(@Query("activityId") String actId);

    @POST("heaven-api/api/upload/upload")
    Observable<UploadFileResultBean> uploadFile(@Body RequestBody requestBody);

    @POST("heaven-api/api/index/participateActivity")
    Observable<BaseResponse<Object>> participateActivity(@Body RequestBody requestBody);

    @POST("heaven-api/api/my/vote")
    Observable<BaseResponse<Object>> workVote(@Body RequestBody requestBody);

    @GET("heaven-api/api/index/history")
    Observable<BaseResponse<ContentBean>> historySearch();

    @GET("heaven-api/api/index/hotSearch")
    Observable<BaseResponse<ContentBean>> hotSearch();

    @GET("heaven-api/api/index/search")
    Observable<BaseResponse<QuestionContentBean>> search(@Query("searchName") String searchName, @Query("page") String page, @Query("pageSize") String pageSize);

    @GET("heaven-api/api/index/questionDetails")
    Observable<BaseResponse<ContentBean>> getQuestionDetail(@Query("questionId") String questionId);

    @GET("heaven-api/api/index/facultyTeamDetails")
    Observable<BaseResponse<TeacherContentBean>> getTeacherDetail(@Query("userId") String teacherId);

    @GET("heaven-api/api/my/userInfo")
    Observable<BaseResponse<UserContentBean>> getUserInfo();

    @GET("heaven-api/api/select/grade")
    Observable<BaseResponse<ContentBean>> getGradeList();

    @GET("heaven-api/api/select/subject")
    Observable<BaseResponse<ContentBean>> getSubjectList();

    @GET("heaven-api/api/select/qualifications")
    Observable<BaseResponse<ContentBean>> getQualificationsList();

    @GET("heaven-api/api/select/mandarin")
    Observable<BaseResponse<ContentBean>> getMandarinList();

    @POST("heaven-api/api/my/applyAnswer")
    Observable<BaseResponse<Object>> applyAnswer(@Body RequestBody requestBody);

    @GET("heaven-api/api/my/applyDetails")
    Observable<BaseResponse<ContentBean>> applyDetail();

    @GET("heaven-api/api/my/myAccount")
    Observable<BaseResponse<ExpenseRecordContentBean>> myAccount(@Query("page") String page, @Query("pageSize") String pageSize);

    @GET("heaven-api/api/my/billingInstructions")
    Observable<BaseResponse<ContentBean>> getBillingInstructions();

    @GET("heaven-api/api/order/orderList")
    Observable<BaseResponse<OrderContentBean>> getOrderList(@Query("status") String status, @Query("page") String page, @Query("pageSize") String pageSize);

    @GET("heaven-api/api/my/myFollow")
    Observable<BaseResponse<AttentionQuestionContentBean>> getAttentionQuestionList(@Query("relationType") String relationType, @Query("page") String page, @Query("pageSize") String pageSize);

    @GET("heaven-api/api/my/myFollow")
    Observable<BaseResponse<AttentionTeacherContentBean>> getAttentionTeacherList(@Query("relationType") String relationType, @Query("page") String page, @Query("pageSize") String pageSize);

    @POST("heaven-api/api/order/addOrder")
    Observable<BaseResponse<Object>> uploadQuestion(@Body RequestBody requestBody);

    @GET("heaven-api/api/order/orderDetails")
    Observable<BaseResponse<ContentBean>> getOrderDetail(@Query("orderId") String orderId);

    @POST("heaven-api/api/order/orderCancel")
    Observable<BaseResponse<Object>> cancelOrder(@Body RequestBody requestBody);

    @GET("heaven-api/api/index/answerStatistics")
    Observable<BaseResponse<ContentBean>> getTopStatistics();

    @GET("heaven-api/api/order/answerList")
    Observable<BaseResponse<ListContentBean>> getAnswerQuestionList(@Query("page") String page, @Query("pageSize") String pageSize);

    @POST("heaven-api/api/order/meetOrder")
    Observable<BaseResponse<Object>> meetOrder(@Body RequestBody requestBody);

    @POST("heaven-api/api/order/answerType")
    Observable<BaseResponse<Object>> selectAnswerType(@Body RequestBody requestBody);

    @GET("heaven-api/api/my/userHeadPic")
    Observable<BaseResponse<ContentBean>> userHeadPic(@Query("userId")String userId);

    @POST("heaven-api/api/order/answerSuccess")
    Observable<BaseResponse<Object>>  answerSuccess(@Body RequestBody requestBody);

    @POST("heaven-api/api/my/switch")
    Observable<BaseResponse<UserBean>> switchIdentity(@Body RequestBody requestBody);

    @POST("heaven-api/api/order/sendOrder")
    Observable<BaseResponse<Object>> sendOrder(@Body RequestBody requestBody);

    @POST("heaven-api/api/order/orderPay")
    Observable<BaseResponse<ContentBean>> orderPay(@Body RequestBody requestBody);

    @POST("heaven-api/api/my/recharge")
    Observable<BaseResponse<ContentBean>> recharge(@Body RequestBody requestBody);

    @GET("heaven-api/api/select/pay")
    Observable<BaseResponse<ContentBean>> payQuery(@Query("payId")String payId, @Query("type")String type);

    @POST("heaven-api/api/order/orderEvaluate")
    Observable<BaseResponse<ContentBean>> orderEvaluate(@Body RequestBody requestBody);

    @GET("heaven-api/api/my/integralSet")
    Observable<BaseResponse<ContentBean>> getRegulation();

    @POST("heaven-api/api/my/integral")
    Observable<BaseResponse<ContentBean>> creditsExchange(@Body RequestBody requestBody);

    @POST("heaven-api/api/order/newOrder")
    Observable<BaseResponse<ContentBean>>  newOrder(@Body RequestBody requestBody);

    @POST("heaven-api/api/order/userCannelOrder")
    Observable<BaseResponse<Object>> cancelTakeOrder(@Body RequestBody requestBody);

    @POST("heaven-api/api/my/feedback")
    Observable<BaseResponse<Object>> feedback(@Body RequestBody requestBody);

    @POST("heaven-api/api/my/withdrawal")
    Observable<BaseResponse<ContentBean>> withDrawal(@Body RequestBody requestBody);

    @POST("heaven-api/api/my/share")
    Observable<BaseResponse<ContentBean>>  share(@Body RequestBody requestBody);

    @GET("heaven-api/api/my/shareList")
    Observable<BaseResponse<ShareContentBean>> shareList(@Query("page") String page, @Query("pageSize") String pageSize);

    @GET("heaven-api/api/my/zfdAuthToken")
    Observable<BaseResponse<ContentBean>> getAliAuthToken();

    @POST("heaven-api/api/my/zfdCode")
    Observable<BaseResponse<ContentBean>>  uploadAliToken(@Body RequestBody requestBody);

    @GET("heaven-api/api/my/withdrawalExplain")
    Observable<BaseResponse<ContentBean>> getWithDrawalHint();
}
